#pragma once
#include "xvideo_view.h"

struct SDL_Window;
struct SDL_Renderer;
struct SDL_Texture;

class XSDL :public XVideo_View
{
public:

	bool init(int w, int h, Format fmt) override;

	bool draw(const unsigned char* data, int linesize = 0) override;

	virtual bool draw(
		const unsigned char* y, int y_pitch,
		const unsigned char* u, int u_pitch,
		const unsigned char* v, int v_pitch
	) override;

	void close() override;

	bool isExit() override;
private:
	SDL_Window* win_;
	SDL_Renderer* renderer_;
	SDL_Texture* texture_;

};

